<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html>
    <head>
        <title>Start Page</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="./css/main.css">
    </head>
    <body>
        <h1>Welcome to simple web app!!!</h1>
        <ul class="menu">
        	<c:choose>
        		<c:when test="${empty isAuth}">
	        		<li>
		        		<a href="<c:url value="/login"/>">Login</a>
		        	</li>
		        	<li>
		        		<a href="<c:url value="/register"/>">Register</a>
		        	</li>
        		</c:when>
        		<c:otherwise>
        			<li>
		        		<a href="<c:url value="secured_page.jsp"/>">Secured Page</a>
		        	</li>
        			<li>
		        		<a href="<c:url value="/logout"/>">Logout</a>
		        	</li>
        		</c:otherwise>
        	</c:choose>
        </ul>
    </body>
</html>
